# Generated by Django 3.2.16 on 2022-12-05 06:24

from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import siriuso.models.postgres
import siriuso.utils.modules
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('sites', '0002_alter_domain_unique'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('main', '0001_squashed_0021_auto_20221025_0702'),
    ]

    operations = [
        migrations.CreateModel(
            name='EnhavoEnhavoTipo',
            fields=[
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='UUID')),
                ('krea_dato', models.DateTimeField(auto_now_add=True, verbose_name='Krea dato')),
                ('forigo', models.BooleanField(blank=True, default=False, verbose_name='Forigo')),
                ('foriga_dato', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Foriga dato')),
                ('a_foriga_dato', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Aŭtomata foriga dato')),
                ('publikigo', models.BooleanField(default=False, verbose_name='Publikigis')),
                ('publikiga_dato', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Dato de publikigo')),
                ('arkivo', models.BooleanField(default=False, verbose_name='Arkiva')),
                ('arkiva_dato', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Arkiva dato')),
                ('kodo', models.CharField(max_length=16, verbose_name='Kodo')),
                ('speciala', models.BooleanField(default=False, verbose_name='Speciala')),
                ('nomo', models.JSONField(blank=True, default=siriuso.utils.modules.default_lingvo, encoder=siriuso.models.postgres.CallableEncoder, verbose_name='Nomo')),
                ('wablomo', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='enhavo_enhavoenhavotipo_wablomo', to='main.siriusowablono', verbose_name='Ĝenerala ŝablono')),
            ],
            options={
                'verbose_name': 'Tipo de enhavo',
                'verbose_name_plural': 'Tipoj de enhavo',
                'db_table': 'enhavo_tipoj',
            },
        ),
        migrations.CreateModel(
            name='EnhavoEnhavo',
            fields=[
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='UUID')),
                ('krea_dato', models.DateTimeField(auto_now_add=True, verbose_name='Krea dato')),
                ('forigo', models.BooleanField(blank=True, default=False, verbose_name='Forigo')),
                ('foriga_dato', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Foriga dato')),
                ('a_foriga_dato', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Aŭtomata foriga dato')),
                ('publikigo', models.BooleanField(default=False, verbose_name='Publikigis')),
                ('publikiga_dato', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Dato de publikigo')),
                ('arkivo', models.BooleanField(default=False, verbose_name='Arkiva')),
                ('arkiva_dato', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Arkiva dato')),
                ('id', models.IntegerField(default=0, unique=True, verbose_name='ID')),
                ('autoro', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='enhavo_enhavoenhavo_autoro', to=settings.AUTH_USER_MODEL, verbose_name='Aŭtoro')),
                ('retejoj', models.ManyToManyField(to='sites.Site', verbose_name='Retejoj')),
                ('slugo', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.siriusoslugo', verbose_name='Slugo')),
                ('tipo', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='enhavo.enhavoenhavotipo', verbose_name='Tipo')),
                ('lasta_autoro', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='enhavo_enhavoenhavo_lasta_autoro', to=settings.AUTH_USER_MODEL, verbose_name='Modifita de')),
                ('lasta_dato', models.DateTimeField(blank=True, null=True, verbose_name='Dato de lasta modifo')),
                ('nomo', models.JSONField(blank=True, default=siriuso.utils.modules.default_lingvo, encoder=siriuso.models.postgres.CallableEncoder, verbose_name='Titolo')),
                ('teksto', models.JSONField(blank=True, default=siriuso.utils.modules.default_lingvo, encoder=siriuso.models.postgres.CallableEncoder, verbose_name='Teksto')),
                ('wablomo', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='enhavo_enhavoenhavo_wablomo', to='main.siriusowablono', verbose_name='Ĝenerala ŝablono')),
            ],
            options={
                'verbose_name': 'Enhavo',
                'verbose_name_plural': 'Enhavo',
                'db_table': 'enhavo_enhavo',
                'ordering': ('nomo',),
            },
        ),
    ]
